package SmartHome.entity;

import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;

/**
 * ClassName : Device
 * Description :
 * Author : Wang Beijia
 * Date: 2021-07-05 21:49
 */

public class DeviceInfo {
    private final SimpleIntegerProperty deviceId;
    private final SimpleStringProperty deviceName;
    private final SimpleStringProperty deviceType;
    private final SimpleStringProperty description;
    private final SimpleStringProperty manufacturer;
    private final SimpleIntegerProperty familyID;
    private final SimpleIntegerProperty deviceTypeId;
    private final SimpleBooleanProperty Exist;


    public DeviceInfo(Integer deviceId, String deviceName, String deviceType,
                      String description, String manufacturer, Integer familyID, Integer deviceTypeId,
                      Boolean Exist) {
        this.deviceId = new SimpleIntegerProperty(deviceId);
        this.deviceName = new SimpleStringProperty(deviceName);
        this.deviceType = new SimpleStringProperty(deviceType);
        this.description = new SimpleStringProperty(description);
        this.manufacturer = new SimpleStringProperty(manufacturer);
        this.familyID = new SimpleIntegerProperty(familyID);
        this.deviceTypeId = new SimpleIntegerProperty(deviceTypeId);
        this.Exist = new SimpleBooleanProperty(Exist);
    }

    public int getDeviceId() {
        return deviceId.get();
    }
    public SimpleIntegerProperty deviceIdProperty(){ return deviceId;}
    public void setDeviceId(int deviceId) {
        this.deviceId.set(deviceId);
    }

    public String getDeviceName() {
        return deviceName.get();
    }
    public SimpleStringProperty deviceNameProperty(){return deviceName;}
    public void setDeviceName(String deviceName) {
        this.deviceName.set(deviceName);
    }

    public String getDeviceType() {
        return deviceType.get();
    }
    public SimpleStringProperty deviceTypeProperty(){return  deviceType;}
    public void setDeviceType(String deviceType) {
        this.deviceType.set(deviceType);
    }


    public String getDescriptionn() {
        return description.get();
    }
    public SimpleStringProperty descriptionProperty() {
        return description;
    }
    public void setDescription(String description) {
        this.description.set(description);
    }


    public String getManufacturer() {
        return manufacturer.get();
    }
    public SimpleStringProperty manufacturerProperty() {
        return manufacturer;
    }
    public void setManufacturer(String manufacturer){
        this.manufacturer.set(manufacturer);
    }

    public boolean isExist(){
        return Exist.get();
    }
    public SimpleBooleanProperty existProperty() {
        return Exist;
    }
    public void setExist(boolean Exist){
        this.Exist.set(Exist);
    }

    public int getDeviceTypeId() {
        return deviceTypeId.get();
    }
    public SimpleIntegerProperty deviceTypeIdProperty(){ return deviceTypeId;}
    public void setDeviceTypeId(int deviceTypeId) {
        this.deviceTypeId.set(deviceTypeId);
    }

    public int getFamilyID() {
        return familyID.get();
    }
    public SimpleIntegerProperty familyIDProperty(){ return familyID;}
    public void setFamilyID(int familyID) {
        this.familyID.set(familyID);
    }

    @Override
    public String toString() {
        return "familyInfo{" +
                "deviceId=" + deviceId +
                ", deviceName='" + deviceName + '\'' +
                ", deviceType='" + deviceType + '\'' +
                ", description='" + description + '\'' +
                ", manufacturer='" + manufacturer + '\'' +
                ", deviceTypeId='" + deviceTypeId + '\'' +
                ", familyId='" + familyID + '\'' +
                ", Exist='" + Exist + '\'' +
                '}';
    }
}

